package Data;

import java.util.HashMap;

/*
找出数组中和为s的一个数组
 */
public class min {

  public static void main(String[] args) {
    int num[] = {1,2,4,14,15};

    int k = 15;

    int a[] = new int[2];


    for(int i = 0;i<num.length;i++){
      for (int j = i+1;j<num.length;j++){
        if(num[i]+num[j]==k){
          a[0] = num[i];
          a[1] = num[j];
          break;
        }
      }
    }

    for (int i : a) {
      System.out.println(i);
    }
  }
}
